import request from '@/utils/request'

export function getByParam(params) {
    return request({
        url: '/workOrdersManagement/workOrders/queryByParam',
        method: 'get',
        params
    })
}

export function getType(params) {
    return request({
        url: '/workOrdersManagement/workOrders/queryType',
        method: 'get',
        params
    })
}

export function update(data) {
    return request({
        url: '/workOrdersManagement/workOrders/edit',
        method: 'post',
        data
    })
}

export function add(data) {
    return request({
        url: '/workOrdersManagement/workOrders/add',
        method: 'post',
        data
    })
}

export function deleteById(id) {
    return request({
        url: '/workOrdersManagement/workOrders/deleteById',
        method: 'post',
        headers: {
            'Content-Type': 'application/json'
        },
        data: id
    })
}

export function deleteBatch(data) {
    return request({
        url: '/workOrdersManagement/workOrders/deleteBatch',
        method: 'post',
        data
    })
}

export function getStatus(params) {
    return request({
        url: '/workOrdersManagement/workOrders/queryStatus',
        method: 'get',
        params
    });
}
